package com.juku2024.juku.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.juku2024.juku.R
import java.util.*

class SpeedClarityAdapter(data: ArrayList<String>) :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_video_controller_speed, data), LoadMoreModule {

    var defaultPos: Int = 0

    override fun convert(holder: BaseViewHolder, item: String) {
        val colorRes = if (defaultPos == holder.layoutPosition) {
            R.color.color_text_light
        } else {
            R.color.color_text_dark
        }

        holder.setText(R.id.tvSpeed, item)
            .setTextColorRes(R.id.tvSpeed, colorRes)
    }

}